	<link rel="stylesheet" href="{__STATIC__}/mdeditor/css/editormd.min.css?v=1.0.2">
	<script src="{__STATIC__}/mdeditor/editormd.min.js"></script>
	<script src="{__STATIC__}/mdeditor/plugins/paste.upload.img.js"></script>
	<script type="text/javascript">
		var editormdId='[id]';
		var editormdMarkdown='[markdown]';
		var editormdHeight='[height]';
		var editormdWatch=[watch];
		var toolbarArray=[toolbar];
		var editormdToolbar=[
					"undo", "redo","bold", "del", "italic", "quote","h1", "h2", "h3", "h4", "h5",
					"list-ul", "list-ol", "hr","link", "reference-link", "image", "code", "code-block", "table","watch", "fullscreen"
				];
		if(toolbarArray && toolbarArray.length>0){
			editormdToolbar=toolbarArray;
		}
		var indexMarkdownEditor;
		setTimeout(function(){
			indexMarkdownEditor = editormd(editormdId, {
				placeholder : "此处开始编写您要发布的内容...",//这里不设置则为默认的
				path : '/static/mdeditor/lib/',
				height           : editormdHeight,
				markdown         : document.getElementById(editormdMarkdown).value,
				htmlDecode       : "style,script,iframe",
				watch            : editormdWatch, 
				imageUpload: true,
				imageFormats: ["jpg", "jpeg", "gif", "png", "bmp", "webp"],
				imageUploadURL: "/api/index/md_upload",		
				saveHTMLToTextarea : true,//保存html到textarea
				toolbarIcons : function() {
					return editormdToolbar;
				}, 
				lang:{
					dialog:{
						preformattedText:{placeholder : "此处编写代码..."},
						codeBlock:{placeholder : "此处编写代码...."}
					}
				},
				onfullscreen : function() {
					this.editor.css("z-index", 120);
				},
				onfullscreenExit : function() {
					this.editor.css({
						zIndex : 10,
						border : "none",
					});			
					this.resize();
				},
				onload : function() {
					initPasteDragImg(this); //必须
				}
			})
		},200);

	</script>